package com.kenans.service.impl;

import com.kenans.dao.CarDao;
import com.kenans.entity.Car;
import com.kenans.service.CarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author KENANS
 * @date 2020-8-26 20:19
 * @Version 1.0
 */
@Service
public class CarServiceImpl implements CarService {
    @Autowired
    private CarDao carDao;

    @Override
    public List<Car> findAllOfPrice(Integer cid) {
        List<Car> cars = carDao.findAllOfPrice(cid);
        return cars;
    }

    @Override
    public List<Car> findAllOfNumber(Integer cid) {
        List<Car> cars = carDao.findAllOfNumber(cid);
        return cars;
    }

    @Override
    public Car findByCid(Integer cid) {
        Car car = carDao.findByCid(cid);
        return car;
    }
}
